package com.dhcc.DRGsHosp.facade.dto;

import java.util.Enumeration;
import java.util.HashMap;
import java.util.Map;

import javax.servlet.http.HttpServletRequest;

public class ParamMap {
	/**
	 * @methodname :newMap
	 * @Description : 
	 * @author:LiuHongjun
	 * @return Map
	 * @date :2016年9月25日
	 */
	public Map<String,Object> newMap(HttpServletRequest request){
		Map<String,Object> map = new HashMap<String,Object>();  
        Enumeration paramNames = request.getParameterNames();  
        while (paramNames.hasMoreElements()) {  
            String paramName = (String) paramNames.nextElement();  
            String[] paramValues = request.getParameterValues(paramName);  
            if (paramValues.length == 1) {  
                String paramValue = paramValues[0];  
                if (paramValue.length() != 0) {  
                    map.put(paramName, paramValue);  
                }  
            }  
        }
		return map;
	}

}
